<template>
	<view class="flex flex-direction" :class="[$themeClass('page-bg-color')]">
		<uni-status-bar v-if="!isShowNav" />
		<slot name="nav"/>
		<view :style="{'height': 'calc(100vh - ' + statusBarHeight + ' - ' + navHeight + ' - ' + tabbarHeight + ')'}">
			<slot name="content" />
		</view>
		<view class="cu-bar tabbar shadow foot" v-if="isShowTabbar">
			<slot name="tabbar"/>
		</view>
	</view>
</template>
<script>
export default {
	name: 'com-page',
	data() {
	    return {
			statusBarHeight: '',
			isShowNav: true,
			isShowTabbar: true,
			navHeight: '45px',
			tabbarHeight: '100rpx',
	    }
	},
	mounted() {
		this.statusBarHeight = this.StatusBar + 'px';
		console.log(this.$slots);
		if(!this.$slots["nav"]){
			this.isShowNav = false;
			this.navHeight = '0px';
		}
		if(!this.$slots["tabbar"]){
			this.isShowTabbar = false;
			this.tabbarHeight = '0rpx';
		}
	},
	props: {
	    copyLink: {
			type: Boolean,
			default: true
	    }
	},
	components: {
	},
	methods: {
		
	},
}
</script>

<style scoped>
</style>
